﻿@using Utils;
@model WebUI.Models.CoSavedTalentViewModel
@{
    ViewBag.Title = "Saved Talent List - JuicyBasket";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="mainCol">
    <div class="profile">
        <div class="fl">
            <a href="@Url.Action("JobList")" title="@Model.Co.Name">
                <img class="avatar80" src="@Url.StaticFile(Model.AvatarUrl)" alt="@Model.Co.Name"/>
            </a>
        </div>
        <div class="fl">
            <h1>
                <span>@Model.Co.Name</span>
            </h1>
            
            <div class="profile-detail">
                @if (!string.IsNullOrEmpty(Model.Co.Location))
                {
                <div class="fl">
                    <a href="#" class="locality">@Model.Co.Location</a>
                </div>
                }
                @if (!string.IsNullOrEmpty(Model.Co.CoUrl))
                {
                <div class="fl">
                    <a href="@Model.Co.CoUrl" class="url" target="_blank">@Model.Co.CoUrl.ToDomainName()</a>
                </div>
                }
            </div>
            <div class="clear"></div>
            <div>
                <a class="action editaccount" href="/company/editprofile">
                    <span>Edit Account</span>
                </a>
            </div>
            <div class="clear"></div>
        </div>
    </div>
    <ul class="tabs">
        <li>
            <a href="@Url.Action("JobList")">Jobs</a>
        </li>
        <li>
            <a href="@Url.Action("BillingHistory")">Billing History</a>
        </li>
        <li class="active">
            <a href="@Url.Action("SavedTalent")">Saved Talent</a>
        </li>
        <li>
            <a href="@Url.Action("SavedJobs")">Saved Jobs</a>
        </li>
    </ul>
    <div class="tabsbottom"></div>
    <div class="clear"></div>
    @if (Model.IndLoginList.Count > 0)
    {
    <ol class="player-cards">
        @for (int i = 0; i < Model.IndLoginList.Count; i++)
        {
            var indLogin = Model.IndLoginList[i];
            <li>
                <div class="player-info">
                    <div class="player-cards-profile">
                        <div class="fl">
                            <a href="@Url.Action("Shots", "Ind", new { UserName = indLogin.Login.UserName })" title="@indLogin.Ind.FullName">
                                <img class="avatar80" src="@Url.StaticFile(indLogin.Ind["AvatarUrl"])" alt="@indLogin.Ind.FullName"/>
                            </a>
                        </div>
                        <div class="vsmallspacer"></div>
                        <div class="fl">
                            <h1>
                                <a href="@Url.Action("Shots", "Ind", new { UserName = indLogin.Login.UserName })" title="@indLogin.Ind.FullName">@indLogin.Ind.FullName</a>
                                @if (indLogin.Ind.AvailableForHire)
                                {
                                <span rel="tipsy" original-title="@indLogin.Ind.FullName is available for hire. To send a work inquiry, use the Hire Me button on this designer's profile.">
                                    <img src="@Url.StaticFile("/content/images/icon-contact.png")" width="14"/>
                                </span>
                                }
                            </h1>
                            <div class="profile-title">
                                <span>@indLogin.Ind.Title</span>
                            </div>
                            <div class="profile-detail">
                                <div class="fl">
                                    <a href="@Url.Action("Designers", "Search", new { location = indLogin.Ind.Location })" class="locality">@indLogin.Ind.Location</a>
                                </div>
                            </div>
            
                            <div class="clear"></div>
                        </div>
                    </div>
                </div>
                <div class="shots">
                    @foreach(var shot in indLogin.Ind.ShotList)
                    {
                        <a href="/shots/@shot.ShotID" title="@shot.Title">
                            <img alt="@shot.Title" src="@shot["ShotUrl"]"/>
                        </a>
                    }
                </div>
                <div class="action">
                    <div class="smallspacer"></div>
                    <div class="saved-info">Saved</div>
                    <div class="saved-info">@indLogin.Ind.SavedDate.ToDateTimeString()</div>
                    <div class="smallspacer"></div>
                    <div class="unsave"><a href="/account/unsave?loginid=@indLogin.Login.LoginID" rel="unsave">Unsave</a></div>
                </div>
                <div class="clear"></div>
            </li>
        }
    </ol>
    <div class="clear"></div>
    <div class="page">
        <div class="paging">
        @if (Model.PreviousPage > 0)
        {
            <a href="@Url.Action("savedTalent", new { Page = Model.PreviousPage })" class="action pagingaction" rel="prev">← Newer</a>
        }
        @if (Model.NextPage > 0)
        {
            <a href="@Url.Action("savedTalent", new { Page = Model.NextPage })" class="action pagingaction" rel="next">Older →</a>
        }
        </div>
    </div>
    }
    else
    { 
    <div class="null-message">
	    <h2>None</h2>
    </div>
    }
    <div class="clear"></div>
</div>
<div class="sideCol">
    <div class="profile">
        <div class="jbblock">
            Remaining Job Credits: <span class="blue">@Model.Co.JobCredits</span>
        </div>
        <div class="clear"></div>
        <div class="smallspacer"></div>
        <div>
            <a class="action postjob" href="/job/post">
                <span>Post a Job</span>
            </a>
            <a class="action buycredits" href="/job/buycredits">
                <span>Buy Job Credits</span>
            </a>
        </div>
        
    </div>
    <div class="clear"></div>
</div>

@section FooterContent
{
    <script type="text/javascript" src="@Url.StaticFile("~/content/jquery.form.js")"></script>
    <script type="text/javascript" src="@Url.StaticFile("~/content/jquery.tipsy.js")"></script>
    <script type="text/javascript" src="@Url.StaticFile("~/content/shots.js")"></script>
}